package tinyuser.security;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

public class MyUserManager {

	@PersistenceContext
	EntityManager ctx;



	MyUser getUser(String name) {
		return ctx.find(MyUser.class, name);
	}



	MyUserGroup getGroup(String name) {
		return ctx.find(MyUserGroup.class, name);

	}



	void save(MyUser user) {
		ctx.persist(user);
	}



	void save(MyUserGroup group) {
		ctx.persist(group);
	}

}
